package model
{	
	import flash.events.EventDispatcher;
	
	import mx.collections.ArrayCollection;
	
	import vo.User;
	
		
//[Bindable]
	public class ModelLocator extends EventDispatcher{		
		
		public static const LOGIN_OK:String = "loginOK";
		public static const LOGIN_FAILED:String = "loginFailed";		
        public static const REGISTER_OK:String = "registerOK";
		public static const REGISTER_FAILED:String = "registerFailed";
		public static const NAME_EXISTED:String = "nameExisted";
		public static const NAME_NOT_EXISTED:String = "nameNotExisted";
		public static const ADDMARKER_OK:String = "AddMarkerOK";
		public static const ADDMARKER_FAILED:String = "AddMarkerFailed";
		public static const SHAREMARKER_OK:String = "ShareMarkerOK";
		public static const SHAREMARKER_FAILED:String = "ShareMarkerFailed";
		public static const SAVE_MSG_OK:String = "saveMsgOk";
		public static const MOD_MSG_OK:String = "modMsgOk";
		public static const SHOW_ROUTES_OK:String = "showRoutesOk";
		public static const SHOWALLSHAREMARKERS_FAILED:String = "ShowAllMarkersFailed";
		public static const SHOWALLSHAREMARKERS_OK:String = "ShowAllMarkersOK";
		public static const SHOWALLMARKERS_FAILED:String = "ShowAllMarkersFailed";
		public static const SHOWALLMARKERS_OK:String = "ShowAllMarkersOK";
		public static const SHOWTYPEMARKERS_FAILED:String = "ShowTypeMarkersFailed";
		public static const SHOWTYPEMARKERS_OK:String = "ShowTypeMarkersOK";
		public static const DELETEASHAREMARKER_FAILED:String = "DeleteAShareMarkerFailed";
		public static const DELETEASHAREMARKER_OK:String = "DeleteAShareMarkerOK";
		public static const EDITMARKER_OK:String = "editMarkerOK";
		public static const EDITMARKER_FAILED:String = "editMarkerFailed";
		public static const SAVE_PATH_OK:String = "savePathOK";
		public static const SAVE_ROUTE_OK:String = "saveRouteOK";
		public static const SAVE_FAILED:String = "saveFailed";
		public static const SAVE_ALL_OK:String = "saveAllOK";
		public static const CHANGE_INFO_OK:String = "changeInfoOk";
		public static const SHOW:String = "show";
		public static const DELETE_SHARE_OK:String = "deleteOk";
		public static const DELETEAMYMARKER_OK:String="deleteAMyMarkerOk";
		public static const SHAREPHOTO_OK:String = "sharePhotoOk";
		private static var _instance:ModelLocator;
		public static const WEB:String = "GMdb";
		public static var roomName:String = "";
		public static const SERVER:String = "localhost";
		public static function getInstance():ModelLocator{
			if(_instance == null){
				_instance = new ModelLocator();
			}
			return _instance;
		}
		//
		[Bindable]
		public var user:User;
		[Bindable]
		public var pathname:String;
		//public var allRoutes:ArrayCollection;
		[Bindable]
		public var allRouteDetails:ArrayCollection;
		[Bindable]
		public var allPlans:Object;
		[Bindable]
		public var myPathShare:ArrayCollection;
		[Bindable]
		public var allMessges:ArrayCollection;
		[Bindable]
		public var allUsers:ArrayCollection;
		[Bindable]
		public var allUsersDetails:ArrayCollection;
		[Bindable]
		public var allFriends:ArrayCollection;
		[Bindable]
		public var addAMarkerShare:Object;
		[Bindable]
		public var allShowAllShareMarkers:ArrayCollection;
		[Bindable]
		public var allTheTypeMarkers:Object;
		[Bindable]
		public var tempmarker:Object;
		[Bindable]
		public var MarkerId:String;
		[Bindable]
		public var pathid:String;
		public function clearMsg():void{
			allMessges.removeAll();
		}
	}
}